﻿CREATE TABLE [dbo].[forum_ThreadNote] (
    [ThreadNoteId] BIGINT           IDENTITY (1, 1) NOT NULL,
    [Text]         NVARCHAR (MAX)   NOT NULL,
    [ThreadId]     BIGINT           NOT NULL,
    [Order]        INT               NOT NULL,
    [CreatedBy]     UNIQUEIDENTIFIER NOT NULL,
    [CreatedDate]   DATETIME         CONSTRAINT [DF_forum_ThreadNote_CreateDate] DEFAULT (getutcdate()) NOT NULL,
    [UpdatedBy]     UNIQUEIDENTIFIER NULL,
    [UpdatedDate]   DATETIME         NULL,
    CONSTRAINT [PK_forum_ThreadNote] PRIMARY KEY CLUSTERED ([ThreadNoteId] ASC),
    CONSTRAINT [FK_forum_ThreadNote_forum_Thread] FOREIGN KEY ([ThreadId]) REFERENCES [dbo].[forum_Thread] ([ThreadId])
);

